package com.shared.server.impl;

import com.shared.dao.PAddressMapper;
import com.shared.pojo.PAddress;
import com.shared.server.PAddressServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PAddressServerImpl implements PAddressServer {

    @Autowired
    private PAddressMapper pAddressMapper;
    @Override
    public List<PAddress> findAddressByUserId(Integer userid) {
        return pAddressMapper.findAddressByUserId(userid);
    }

    @Override
    public void deleteAddress(Integer id) {
         this.pAddressMapper.deleteAddress(id);
    }

    @Override
    public void addAddress(PAddress pAddress) {
        this.pAddressMapper.insert(pAddress);
    }
}
